package org.testframe;

import java.util.Random;

/**
 * 随机数生成器
 * @author 丁常磊
 * @date 2023/11/20 17:11
 */

public class RandomNumberGenerator {

    private final double max;

    public RandomNumberGenerator(double max) {
        this.max = max;
    }

    public long genLong() {
        double d = new Random().nextDouble() * max;
        return (long) d;
    }

    public double genDouble() {
        return new Random().nextDouble() * max;
    }

}
